# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

import httpx

from .._base_client import (
    make_request_options,
)
from .._resource import SyncAPIResource
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..pagination import SyncPage
from ..types.shop import Shop

__all__ = ["Shops"]


class Shops(SyncAPIResource):
    def list(
        self,
        *,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> SyncPage[Shop]:
        """
        Lists the currently available shops, and provides basic information about each
        one such as the owner and availability.
        """
        return self._post_api_list(
            "/user/authorize/list",
            page=SyncPage[Shop],
            options=make_request_options(
                extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
            ),
            model=Shop,
            body={}
        )
